package com.yiqi.liebang.feature.news.view;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.yiqi.liebang.R;
import com.yiqi.liebang.common.widget.dialog.BasePopup;

class FriendsPop extends BasePopup<FriendsPop> {

        TextView mTvItem1;
        TextView mTvItem2;
        TextView mTvItem3;
        TextView mTvItem4;
        String[] items;

    View.OnClickListener deleteListener;
    View.OnClickListener blackListener;
        public FriendsPop(Context context,View.OnClickListener deleteListener,View.OnClickListener blackListener,String[] items) {
            super(context);
//            setCanceledOnTouchOutside(false);
            this.deleteListener=deleteListener;
            this.items=items;
            this.blackListener=blackListener;
        }

        @Override
        public View onCreatePopupView() {
            View inflate = View.inflate(mContext, R.layout.popup_friends, null);
            mTvItem1 = inflate.findViewById(R.id.tv_item_1);
            mTvItem2 = inflate.findViewById(R.id.tv_item_2);
            return inflate;
        }

        @Override
        public void setUiBeforShow() {
            mTvItem1.setText(items[0]);
            mTvItem2.setText(items[1]);
            mTvItem1.setOnClickListener(deleteListener);
            mTvItem2.setOnClickListener(blackListener);
        }
    }